package 创建的方式;

public class 方式三_Callable {

    static  int i = 0;

    public static void main(String[] args) {

        Runnable r  = new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                i = 1;
            }
        };
        Thread t = new Thread();
        t.start();
        System.out.println(i);
    }
}
